<template>
  <div class="layui-row kgo-show-article-module">
      <h1  v-html="editTitle" class="article-title"></h1>
      <iframe :srcdoc="artileContent"></iframe>
  </div>
</template>

<script>

export default {
    props:{
        url:{
            default: "http://127.0.0.1:8866/document"
        },
        EditId:{
             default:null
        },
        Content:{
             default:"内同"
        }

    },
     data () {
        return {
            artileContent:"内容",
            editTitle:"标题"
        }
    },
   mounted(){
        var $ = layui.$;
        var _article_content = "";
         var _article_title = "";
        $.ajax({
            url: this.url,
            type:"GET",
            async: false, 
            dataType:'json',
            data: {"id":this.EditId},
            success: function(data){
                _article_content = data.textContent;
                _article_title = data.textName;
               
            }
        }); 
        this.artileContent = _article_content ;
        this.editTitle = _article_title;
        console.log(this.artileContent);
   }
}
</script>

<style lang="scss">
.kgo-show-article-module{
    background-color:#FFFFFF;
    height: auto;
    width: 100%;
}
.kgo-show-article-module .article-title{
    background-color:#FFFFFF;
    height: 60px;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
    padding-top: 20px;
    border-bottom: 1px solid #e6e6e6;
}
.kgo-show-article-module iframe{
    border: none;
    height:700px;
    width: 100%;
}
</style>
